package com.sportswork.sportswork.core.service.impl;

import com.sportswork.sportswork.core.entity.Ktinfo;
import com.sportswork.sportswork.core.mapper.InfoMapper;
import com.sportswork.sportswork.core.mapper.KtinfoMapper;
import com.sportswork.sportswork.core.service.IKtinfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dengwei
 * @date 2020/2/3 12:02
 * @description
 */
@Slf4j
@Service
@Transactional
public class KtinfoServiceImp implements IKtinfoService {

    @Resource
    private KtinfoMapper ktinfoMapper;


    @Override
    public Ktinfo addKtinfo(Ktinfo ktinfo) {
        ktinfoMapper.addKtinfo(ktinfo);
        return ktinfo;
    }

    @Override
    public Ktinfo getKtinfo(String id) {
        return ktinfoMapper.getKtinfo(id);
    }

    @Override
    public Ktinfo getKtinfoByNumber(String number) {
        return ktinfoMapper.getKtinfoByNumber(number);
    }

    @Override
    public Ktinfo getKtinfoByNmae(String name) {
        return ktinfoMapper.getKtinfoByName(name);
    }


    @Override
    public List<Ktinfo> getAllKtinfos(String ktmc) {
        return ktinfoMapper.getAllKtinfos(ktmc);
    }

    @Override
    public void deleteKtinfo(String id) {
        ktinfoMapper.deleteKtinfo(id);
    }

    @Override
    public void deleteKtinfos(String ids) {
        ktinfoMapper.deleteKtinfos(ids);
    }

    @Override
    public Ktinfo setKtinfo(Ktinfo ktinfo) {
        ktinfoMapper.setKtinfo(ktinfo);
        return ktinfo;
    }
}
